package com.source.multithread.run;

public class TestJoin implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i <100 ; i++) {
            System.out.println("VIP线程来插队了！！！"+i);
        }
    }


        public static void main(String[] args) throws InterruptedException {
           Thread thread= new Thread(new TestJoin());

            for (int i = 0; i <40 ; i++) {
                System.out.println("主线程在排队！！！"+i);
                if (i==10){
                    thread.start();
                    thread.join();

            }
        }
    }
}